<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<script type="text/javascript">
			var arr=[1,5,665,984,654,321,54,8,65,98,9,32,31,2,884];
			
			arr.sort(function(a,b)
			{
				return a-b;
			})
			
			console.log(arr);
		</script>
	</body>
</html>
